package com.s3s.ssm.view.cashier;

import javax.swing.JPanel;
import java.awt.GridBagLayout;
import javax.swing.JButton;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import javax.swing.JTextField;
import java.awt.Color;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.LayoutStyle.ComponentPlacement;

public class CalculatorPanel extends JPanel {
	private JTextField textField;

	/**
	 * Create the panel.
	 */
	public CalculatorPanel() {
		
		textField = new JTextField();
		textField.setColumns(10);
		
		JButton btnNewButton = new JButton("7");
		
		JButton button = new JButton("8");
		
		JButton button_1 = new JButton("9");
		
		JButton btnTangSl = new JButton("Tang SL");
		
		JButton btnLn = new JButton("L\u00EAn");
		
		JButton button_2 = new JButton("4");
		
		JButton button_3 = new JButton("5");
		
		JButton button_4 = new JButton("6");
		
		JButton btnGiamSl = new JButton("Giam SL");
		
		JButton btnXuong = new JButton("Xuong");
		
		JButton button_5 = new JButton("1");
		
		JButton button_6 = new JButton("2");
		
		JButton button_7 = new JButton("3");
		
		JButton button_8 = new JButton("0");
		
		JButton button_9 = new JButton("000");
		GroupLayout groupLayout = new GroupLayout(this);
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addComponent(textField, GroupLayout.PREFERRED_SIZE, 309, GroupLayout.PREFERRED_SIZE)
				.addGroup(groupLayout.createSequentialGroup()
					.addComponent(btnNewButton)
					.addGap(11)
					.addComponent(button)
					.addGap(24)
					.addComponent(button_1)
					.addGap(18)
					.addComponent(btnTangSl)
					.addGap(12)
					.addComponent(btnLn))
				.addGroup(groupLayout.createSequentialGroup()
					.addComponent(button_2)
					.addGap(11)
					.addComponent(button_3)
					.addGap(24)
					.addComponent(button_4)
					.addGap(19)
					.addComponent(btnGiamSl)
					.addGap(6)
					.addComponent(btnXuong))
				.addGroup(groupLayout.createSequentialGroup()
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addComponent(button_5)
						.addComponent(button_8))
					.addGap(5)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(6)
							.addComponent(button_6))
						.addComponent(button_9))
					.addGap(18)
					.addComponent(button_7)
					.addContainerGap(298, Short.MAX_VALUE))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
					.addGap(5)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addComponent(btnNewButton)
						.addComponent(button)
						.addComponent(button_1)
						.addComponent(btnTangSl)
						.addComponent(btnLn))
					.addGap(5)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addComponent(button_2)
						.addComponent(button_3)
						.addComponent(button_4)
						.addComponent(btnGiamSl)
						.addComponent(btnXuong))
					.addGap(5)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addComponent(button_5)
							.addGap(7)
							.addComponent(button_8))
						.addGroup(groupLayout.createSequentialGroup()
							.addComponent(button_6)
							.addGap(7)
							.addComponent(button_9))
						.addComponent(button_7))
					.addGap(166))
		);
		setLayout(groupLayout);

	}

}
